package com.aaa.sas.service;

import com.aaa.sas.dao.AccountResultDao;
import com.aaa.pojo.Pagesas;
import com.aaa.pojo.ResultBeansas;
import com.aaa.pojo.test_result;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountServiceresultimpl implements AccountServiceresult{
    @Autowired
    AccountResultDao accountResultDao;

    @Override
    public ResultBeansas findAll(Pagesas pagesas,test_result test_result) {
        PageHelper.startPage(pagesas.getPage(), pagesas.getLimit());
        List<test_result> list = accountResultDao.findAll(test_result);
        PageInfo<test_result> pageInfo=new PageInfo<test_result>(list);
        return new ResultBeansas(0,"查询成功",pageInfo.getTotal(),pageInfo.getList());
    }

    @Override
    public Integer delete(Integer id) {
        return accountResultDao.delete(id);
    }

    @Override
    public Integer deletes(@Param("id") Integer[] id) {
        return accountResultDao.deletes(id);
    }

    @Override
    public test_result check(test_result test_result) {
        return accountResultDao.check(test_result);
    }


}
